package com.mgface.framework.springcloud;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 * @author wanyuxiang
 * @version 1.0
 * @project ms-ribbon
 * @create 2017-04-10 17:32
 * @desc 采用配置文件(disable-eureka.yml)属性来启用ribbon
 **/
@SpringBootApplication
@EnableDiscoveryClient
public class RibbonPropertiesApplication {
    @Bean
    @LoadBalanced
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }

    public static void main1(String[] args) {
        SpringApplication.run(RibbonPropertiesApplication.class,args);
    }
}
